<?php /* Copyright 2014 Karl R. Wilcox

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License. */
   
    $this->patterns[languageDB::CHARGE_PREFIX] = array (
      // possibly duplicated in CHARGE_MODS, but sometimes occur first
      'covered', 'standing', 'open', 'heraldic', 'dexter', 'sinister',
      'double', 'branched', 'staved', 'single',
      array ( 'spread', 'displayed' ),
      array ( 'heads? of ?(a|an|the)', 'head-only' ),
      array ( 'closed?', 'closed' ),
      array ( '(dem[yi]|half)', 'demi' ),
      array ( 'like', 'like' ), // not sure whether this has any real meaning, but added as mod just in case
      array ( '(tuft|stalk|limb|sprig|bough|scrog|branche?)s? of ?(a|an|the)', 'portion' ),
      );

   // TODO Deal with all the stuff in _quadrate8.inc
   $this->patterns[languageDB::CHARGE_FEATURES] = array ( 
     'crossed', 'fructed', 'beaked', 'hooped',
     'seeded', 'barbed', 'gemmed', 'acorned',
     'muzzled', 'allume', 'chains', 'tusked',
     'chausse', 'crined', 'cuff', 'nooked',
     'gorged', 'habited', 'lined', 'maned', 'nerved',
     'penned', 'quilled', 'stringed', 'aulned',
     'belled', 'finned', 'nest', 'staff', 'hands',
     'acorns', 'towered', 'domed', 'tasselled',
     'shelled', 'tied', 'headed', // NOT heads
     'drooping', 
     array ( 'bows?', 'bow' ),
     array ( 'buckle(s|d)? ?in ?the ?centre', 'buckled' ),
     array ( 'in the(ir?) shells?', 'shelled' ),
     array ( 'clasp(s|ed)', 'clasped' ),
     array ( 'thread(s|ed)', 'threaded' ),
     array ( 'garnish(ing|ed)',  'garnished' ),
     array ( 'vi[sz]ors?', 'visor' ),
     array ( 'spur(s|red)?', 'spurs' ),
     array ( '(top|impost|cap|capital)s?', 'top' ),
     array ( '(pedestal|base)s?', 'base' ),
     array ( '(tyne|attir|antler)(s|ed)', 'attired' ),
     array ( 'banner(ed|s)?' , 'banner' ),
     array (  'flute[ds]',   'fluted' ),
     array (  'fluke[ds]',   'fluked' ),
     array ( 's?haft(s|ed)?',  'shafted' ),
     array ( '?(duc|imperi)ally crowned', 'crowned' ),
     array ( '(flight|feather)ed', 'feathered' ),
      array ( '(crest|comb)(s|ed)?', 'combed' ),
      array ( '(queue|tail)(s|e?d)', 'tailed' ),
      array ( '(banded|encircled)', 'banded' ),
      array ( 'stocks?', 'stock' ),
      array ( '(stave?|hilt)(s|ed)?', 'handle' ),
      array ( '(pom?mell?s?|pomm?ell?ed)', 'pomell' ),
      array ( '(tongu|langu)(es|ed)', 'tongued' ),
      array ( 'bladed?s?', 'blade' ),
      array ( 'h(andl|elv)ed?s?', 'handle' ),
      array ( 'leaves?d?', 'leaved' ),
      array ( '(b?e?legged|membered)', 'legged' ),
      array ( '(u?o?ngull?ed|hoo[fv]ed?s?)', 'hooved' ),
      array ( 'trunks?e?d?', 'trunked' ),
      array ( '(slipped|stalked|leaved)', 'slipped' ),
      array ( '(legged|membered)', 'legged' ),
      array ( '(winged|aisle)', 'winged' ),
      array ( '(barbed|armed) ?at ?all ?points', 'armoured' ),
      array ( 'in ?full armour', 'armoured' ),
      array ( 'point(s|ed) ?steeled', 'pointed' ),
      array ( 'heads? steeled', 'pointed' ),
      array ( '(e|ai)guisc?e', 'pointed' ),
      array ( '(horned|acorne)', 'horned' ),
      array ( 'horns', 'horned' ),
      array ( '(fimbriated|edged?s?)', 'fimbriated' ),
      array ( '(flower|bud)(s|d?ed)', 'flowers' ),
      array ( 'j[eo]llopped', 'wattled' ),
      array ( 'wattle(s|d)?', 'wattled' ),
      array ( 'hull(s|ed)?', 'hulled' ),
      array ( 'sail(s|ed)?', 'sails' ),
      array ( 'pennant(s|ed)?', 'pennants' ),
      array ( 'collar(s|ed)?', 'collared' ),
      array ( 'eyes ?of ?the ?tails?', 'eyes' ),
      array ( '?vine stick', 'stick' ),
      array ( '?fore feet fettered', 'feetfettered' ),
      array ( 'heads?', 'head-only' ), // See Parker Corpus ADY, usually a mod but if both present, features
      array ( 'faces?', 'face-only' ),
      array ( '(talon|claw)s?', 'claws-only' ),
      array ( 'ears?', 'ears-only' ),
      array ( '(gambe|leg)s?', 'leg-only' ),
);
      $this->patterns[languageDB::BUNDLE] = array (
        array ( '(sheaf|sheave|bundle|bunche?)s? ?of', 'bundle' ),
        array ( 'pairs? ?of', 'pair' ), 
      );
   
   $this->patterns[languageDB::CHARGE_WITH] = array ( 
      array ( '?(each|all|both) (enrich|charg|deck)ed (by|with|of)', 'charged-with' ),
      array ( 'thereon', 'charged-with' ),
      array ( '?charged (at|on) each ?(point|corner|limb) ?with', 'charged-with' ),
      array ( 'surmounted (by|with|of)', 'charged-with' ),
      array ( 'standing (up)?on', 'standing-on' ),
      array ( 'resting (each|its|his|her) claws? (up)?on', 'standing-on' ),
      array ( 'en(toured|vironed|vironee|veloped) (by|with|of)', 'surrounded-by' ),
      array ( 'enfiled (by|with|of)', 'enfiled' ),
      array ( 'engoule (by|with|of)', 'engoule' ),
      array ( 'ensigned (by|with|of)', 'ensigned' ),
      array ( 'adorned (by|with|of)', 'adorned' ),
      array ( 'figured (by|with|of)', 'figured' ),
      array ( 'on ?the upper ?limbs?', 'on-upper-limb' ),  
      array ( 'on ?the lower ?limbs?', 'on-lower-limb' ),  
      array ( 'on ?the sides? ?limbs?', 'on-side-limb' ),  
      array ( 'on ?the breasts?', 'on-breast' ),  
      array ( 'sustaining', 'holding-up' ),
      array ( 'holding a', 'in-hand' ),
      array ( 'held in (its|his|her|their|the) ?* (paw|hand)s? of', 'held-in' ),
      array ( 'holding in (its|his|her|their|the) (paw|hand)s?', 'in-hand' ),
      array ( 'holding in (its|his|her|their|the) (jaw|mouth)s?', 'in-mouth' ),
      array ( 'in the beak', 'in-beak' ),
      array ( 'issuing from', 'assurgent' ),
      array ( 'assurgent', 'assurgent' ),
      array ( 'suspended (by|from|of)', 'suspend-from' ),
      array ( 'suspending', 'suspending' ),
      array ( 'charged (at|on) # (point|corner|limb)s? ?with', 'charge-on-point' ),
      );
   
   $this->patterns[languageDB::CHARGE_MODS] = array (
      'couchant', 'courant', 'coward', 'dormant', 
      'erect', 'pierced', 'voided', 'passant',
      'ringed', 'salient', 'statant', 'equipped', 'accrued',
      'segreant', 'dexter', 'sinister', 'closed', 'accosted',
      'ambulant', 'anime', 'annodated', 'arrondie', 'ascendant', 'aversant',
      'ayrant', 'baillone', 'bi corporate', 'cantoned', 'cloue',
      'developed', 'disarmed', 'disclosed', 'distilling',
      'double tete', 'flotant', 'fumant', 'jessant', 'braced',
      'gradient', 'hauriant', 'increscent', 'unarmed',
      'in lure', 'incensed', 'issuant', 'jacent', 'questing',
      'jessant de lis', 'laminated', 'marined', 'mounted', 'naissant',
      'nimbus', 'eradicated', 'pascuant', 'pinioned', 'removed',
      'retorted', 'sanglat', 'scintillant', 'soaring',
      'spancelled', 'springing', 'surgeant', 'torqued', 'transfluent',
      'transposed', 'tricoporate', 'troncone', 'trussed', 'vervelled',
      'volant', 'vorant', 'ancient', 'blasted', 'forcene', 'broken',
      'covered', 'uncovered', 'waved', 'vambraced', 'double',
      'skipping', 'recursant', 'en arriere', 'fixed',
      'pometty', 'floretty', 'debruised',
      array ( 'sarcelled?', 'sarcelled' ), 
      array ( 'a la quise', 'a-la-quise' ),
      array ( 'pendent ?by ?strings', 'pendent' ), 
      array ( 'ragul(y|ed)', 'raguly' ), 
      array ( 'double headed', 'double-headed' ),
      array ( 'fitch(y|ee) at ?the foot', 'fitchyfoot' ), 
      array ( 'crenell[ey] at the ends', 'crenelly-ends' ), 
      array ( 'fitch(y|ee)', 'fitchy' ), 
      array ( 'barry wavy of # argent ?and azure', 'fountain' ),
      array ( '?holding a * in (her|his|its|their|the) (dexter|right) hand|paw', 'righthand'),
      array ( '?holding a * in (her|his|its|their|the) (dexter|right) foot', 'rightfoot'),
      array ( '?holding a * in (her|his|its|their|the) (sinister|left) hand', 'lefthand'),
      array ( '?holding a * in (her|his|its|their|the) (sinister|left) foot', 'leftfoot'),
      array ( 'tails? (fourche|forked) ?in saltire', 'forktailsaltire' ),
      array ( 'tails? (fourche|forked)', 'forktail' ),
      array ( 'tails? (torqu|now|knott)ed', 'nowedtail' ),
      array ( '(now|knott)ed', 'nowed' ),
      array ( 'fired ?in ?# ?places', 'inflamed' ),
      array ( 'slips crossed', 'slipscrossed' ),
      array ( 'without the head', 'headless' ),
      array ( 'thrust through with a sword', 'throughsword' ),
      array ( 'triple towered', 'tripletower' ),
      array ( 'app(aume|almed)', 'appalmed' ),
      array ( 'cadent dexter', 'cadentdexter' ),
      array ( '?in folia(ge|ted)', 'foliated' ),
      array ( '?in ?(his|their) (glory|splendour)', 'in-glory' ),
      array ( 'in ?(his|their) pride', 'inpride' ),
      array ( 'in ?(her|their) piety', 'inpiety' ),
      array ( 'in ?her (complement|plenitude)', 'full' ),
      array ( 'in ?her increment', 'increscent' ),
      array ( 'in ?her de[ct]r[ie]ment', 'decrescent' ),
      array ( '?mounted on # (degree|step|ascent|grice|griece)s?', 'on-steps' ),
      array ( 'of # (point|ray)s', 'points' ),
      array ( 'in # places', 'places' ),
      array ( '?each of # links', 'links' ),
      array ( 'vuln(ed|ing)', 'vulned' ),
      array ( 'urin?ant', 'uriant' ),
      array ( 'on each side', 'on-each-side' ),
      array ( 'at gaze', 'at gaze' ),
      array ( 'a?d?umbrated', 'umbrated' ),
      array ( 'tripp(ing|ant)', 'trippant' ),
      array ( '(rousant|rising)', 'rising' ),
      array ( 'traversed', 'sinister' ),
      array ( 'tripart(ed|ite)', 'tripartite' ),
      array ( 'refle(ct|x)ed', 'reflexed' ),
      array ( 'r?e?verted', 'reflexed' ),
      array ( 'radiant|rayonne|irradiated', 'radiant' ),
      array ( '(open|expanded|extended|overt)', 'expanded' ),
      array ( '(flammant|bursting|exploding)', 'inflamed' ),
      array ( '(en|in)flamed?', 'inflamed' ),
      array ( 'in ?a (flames?d?|fire)', 'inflamed' ),
      array ( 'emitting flames of fire', 'inflamed' ),
      array ( 'flames? issu(ing|ant) ?from ?each', 'inflamed' ),
      array ( 'na[it]ant?', 'naiant' ),
      array ( 'jessed?', 'jessed' ),
      array ( 'in increment', 'increscent' ),
      array ( 'guarde?d?', 'guarded' ),
      array ( 'doubl(ed|ing)', 'doubled' ),
      array ( '(gringole|guivre)', 'gringole' ),
      array ( '(harboured|lodged)', 'lodged' ),
      array ( '(em)?(flexed|bent|bowed)', 'bent' ),
      array ( '(em)?(flexed|bent|bowed) to ?the (sinister|left)', 'bent-left' ),
      array ( '(em)?(flexed|bent|bowed) to ?the (dexter|right)', 'bent-right' ),
      array ( 'gu?ardant',  'guardant' ),
      array ( 'double nowed', 'double-nowed' ),
      array ( '[ei]mbrued', 'embrued' ),
      array ( '(rais|elevat)ed', 'elevated' ),
      array ( '(dechausse|mutile)', 'dismembered' ),
      array ( '(de|in)famed', 'defamed' ),
      array ( 'decoll(e|ated)', 'decollated' ),
      array ( 'de membered', 'dismembered' ),
      array ( 'dis(member|join)ed', 'dismembered' ),
      array ( '(seje?ant|assis)', 'sejeant' ),
      array ( '(regu?ardant|contourne|tourne)', 'reguardant' ),
      array ( '?wings (display|unfold|overture)ed?', 'displayed' ),
      array ( '(sans|without) wings', 'wingless' ),
      array ( 'seje?ant erect', 'sejeant-erect' ),
      array ( '(c|k)abo(c|s)(h|s)ed', 'caboshed' ),
      array ( 'couped below the shoulders', 'bust-only' ),
      array ( 'couped under the knees', 'thigh-only' ),
      array ( 'couped ?under ?and ?above', 'couped' ),
      array ( 'couped fitch(y|ee)', 'couped-fitchy' ),
      array ( 'points? in base', 'inverted' ),
      array ( 'points? in chief', 'upright' ), 
      array ( 'fitch(y|ee) at ?the foot', 'fitchy' ),
      array ( 'fitch(y|ee)', 'fitchy' ),
      array ( 'points? (reversed|downward)s?', 'inverted' ),
      array ( 'points? (uppermost|upwards)', 'upright' ),
      array ( '(con?joined|aboute) ?at ?the(ir)? ?(head|tail)s',  'conjoined' ),
      array ( 'inverted',   'inverted' ),
      array ( 'trans(fixed|pierced)',   'pierced' ),
      array ( '(revers|subvert)ed',   'reversed' ),
      array ( '(prey|truss)ing',   'preying' ),
      array ( '(entire|firme)',   'entire' ),
      array ( 'en soleil',   'ensoleil'),
      array ( 'respecting each other',  'facing-in'  ),
      array ( 'respectant',  'facing-in'  ),
      array ( 'counter rampant',  'facing-in'  ),
      array ( '(rampant|climant)',  'rampant'  ),
      array ( '(gliding|glissant)',  'glissant'  ),
      array ( '(affrontant|combatant|aspectant)',  'facing-in'  ),
      array ( 'confront(e|ing|y)',  'facing-in'  ),
      array ( '(addorsed|adosse|endorsed)',  'facing-out' ),
      array ( 'bendw(ise|ays) sinister' ,'bendsinwise', ),
      array ( 'bendw(ise|ays)',          'bendwise',    ),
      array ( 'fesse?w(ise|ays)',          'fesswise',    ),
      array ( 'palew(ise|ays)',          'palewise',    ),
      array ( 'lozengew(ise|ays)',          'lozengewise',    ),
      array ( 'erect in pale',           'palewise',    ),
      array ( '(dispo[sn]|arrang)ed', 'ignore' ),
      array ( 'affront(ed?|ant)', 'affronte' ),
      array ( '(lying|laying)', 'ignore' ),
      array ( 'for difference',  'cadency' ), 
      array ( 'annu(lated|ette|ly)', 'annulated' ),
      array ( '(arrache|erased)', 'erased' ),
      array ( '(complexed|intertwined)', 'intertwined' ),
      array ( 'embelif|aslant', 'aslant'),
      array ( '?at anc(hored|hory|re|ed)', 'atanchor' ),
      array ( 'of # masts?', 'masted' ),
      array ( 'in full sail', 'fullsail' ),
      array ( '?(the|her) sails? set', 'fullsail' ),
      array ( '?(the|her) sails? furled ?and ?shrouded', 'sailsfurled'),
      array ( 'snakes? entwined a?round (it|her|him|them)', 'snake-entwined' ),
      array ( 'growing out of the ground', 'from-ground' ),
      array ( 'wings?', 'wing-only' ),
      array ( '(bough|branche?|scrog?)s?', 'bough-only' ), // of a tree
      array ( '(tw|spr)igs?', 'sprig-only' ), // of a tree
      array ( '(cone|nut)s?', 'nut-only' ),
      array ( 'on a chair', 'on-chair' ),
      array ( '(leaf|leaves|slips?)', 'leaf-only' ),
      array ( 'trees?', 'whole-tree' ),
      array ( 'in pairs', 'in-pairs' ),
      array ( 'hounds? ears?', 'hound-ears' ),
      array ( 'in tr(ai|ia)n aspect', 'trian-aspect' ),
      array ( 'to ?the sinister', 'to-sinister' ),
      array ( 'to ?the dexter', 'to-dexter' ),
      array ( 'linked together', 'linked' ),
      array ( 'top turned down', 'turned-down' ),
      array ( '?# (to|in|on) each', 'on-each' ),
      array ( 'long handle[sd]', 'long-handled' ),
);

?>
